package com.dd.common.dto.system.position;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.Min;
import javax.validation.constraints.Pattern;

/**
 * @author cheng
 */
@Schema(description = "职位查询DTO")
@Data
public class SysPositionQueryDTO implements java.io.Serializable {
    @Schema(description = "职位名称", example = "测试工程师")
    private String name;

    @Schema(description = "职位编码", example = "test")
    @Pattern(regexp = "^[a-zA-Z0-9_-]{1,20}$", message = "职位编码格式不正确")
    private String code;

    @Schema(description = "类别：1-技术、2-管理、3-财务、4-运营、5-销售、6-客服、7-其他", example = "1")
    @Range(min = 1, max = 7, message = "类别范围1-7")
    private Integer category;
    @Schema(description = "职级，数字越大级别越高，用于排序或审批流", example = "1")
    @Min(value = 1, message = "职级必须是正整数")
    private Integer level;
    @Schema(description = "状态：1-正常，0-禁用", example = "1")
    @Range(min = 0, max = 1, message = "状态值只能是0或1")
    private Integer status;
}
